/**
 * 审核销售订单
 * @author alern2008@gmail.com
 * @系统名称：定制化辅助生成制造系统
 */

package org.ccams.tran;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
import org.ccams.domain.VProduce;
/*
 * 更新审核信息
 */
public class Tran33125 extends AbstractJsonTran {

	@SuppressWarnings("unchecked")
	public void buildJSONObject(Map model, JSONObject json,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		String idt_salesorders_d=(String)request.getParameter("idt_salesorders_d");
	    String checkinstockpid = "1";
		System.out.println("checkinstockpid为："+checkinstockpid);	    
		System.out.println("idt_salesorders_d为："+idt_salesorders_d);	
		idt_salesorders_d = (idt_salesorders_d != null) ? idt_salesorders_d : "0";		
		HashMap<String, Object> jsonMap = new HashMap<String, Object>();
		boolean success = false;
		String message = "";
		VProduce u= new VProduce();
		u.setIdt_salesorders_d(idt_salesorders_d);
		u.setCheckinstockpid(checkinstockpid);
		int i = getCcamsService().getVproduceDao().updatev_produce_Checkinstock(u);
		if (i == 1) {
			success = true;
			message = "更新成功";
		} else {
			success = false;
			message = "更新失败";
		}
		jsonMap.put("success", success);
		jsonMap.put("message", message);
		json.putAll(jsonMap);
	}
}
